package www.shawn.com.customviewdemo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.widget.Toast;

public class MainActivity extends AppCompatActivity {
    HumidificationColorArcProgressBar bar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        bar = (HumidificationColorArcProgressBar) findViewById(R.id.bar);
        bar.setOnSeekSwitchBtnListener(new HumidificationColorArcProgressBar.OnSeekSwitchBtnListener() {
            @Override
            public void onClick() {

            }
        });
        bar.setOnSeekBtnListener(new HumidificationColorArcProgressBar.OnSeekBtnListener() {
            @Override
            public void OnOpenClick() {
                Toast.makeText(MainActivity.this,"OnOpenClick",Toast.LENGTH_SHORT).show();
            }

            @Override
            public void OnCloseClick() {

            }
        });
        bar.setOnSeekArcChangeListener(new HumidificationColorArcProgressBar.OnSeekArcChangeListener() {
            @Override
            public void onProgressChanged(HumidificationColorArcProgressBar seekArc, int progress, boolean fromUser) {

            }

            @Override
            public void onStartTrackingTouch(HumidificationColorArcProgressBar seekArc) {

            }

            @Override
            public void onStopTrackingTouch(HumidificationColorArcProgressBar seekArc) {

            }

            @Override
            public void onSeekBarChanged(HumidificationColorArcProgressBar seekArc, int progress) {

            }
        });
        bar.setCurrentValues((float)20.0);
    }
}
